/*
Copyright SecureKey Technologies Inc. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package ichain

import (
	reqContext "context"

	"git.cloud.inspur.com/ichain/ichain-protos-go/common"
)

// Consenser ichain 共识节点的抽象接口，具备发送广播协议，点对点协议
type Consenser interface {
	URL() string
	SendBroadcast(ctx reqContext.Context, envelope *SignedEnvelope) (*common.Status, error)
	SendDeliver(ctx reqContext.Context, envelope *SignedEnvelope) (chan *common.Block, chan error)
}
